package com.chenyun.idemlimit.config;

import com.chenyun.idemlimit.aspect.LimiterAspect;
import com.chenyun.idemlimit.aspect.RepeatSubmitAspect;
import org.checkerframework.checker.units.qual.C;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.data.redis.core.RedisTemplate;

import java.io.Serializable;

/**
 * IdemLimitConfig：
 * Description:
 *
 * @author: Lonni
 * @date: 2024/1/22 0022 14:58
 */
@Configuration
public class IdemLimitConfig implements Serializable {

    @Bean
    @Order(10)
    public LimiterAspect limiterAspect(){
        return new LimiterAspect();
    }
    @Bean
    @Order(20)
    public RepeatSubmitAspect repeatSubmitAspect(){
        return new RepeatSubmitAspect();
    }



}



